Security News
Supply Chain Attack Detected in Solana's web3.js Library
A supply chain attack has been detected in versions 1.95.6 and 1.95.7 of the popular @solana/web3.js library.
object.reduce
Advanced tools
Reduces an object to a value that is the accumulated result of running each property in the object through a callback.
Reduces an object to a value that is the accumulated result of running each property in the object through a callback.
Executes the callback function once for each own enumerable property in the object, receiving four arguments: the initial value (or value from the previous callback call), the value
of the current property, the key
of the current property, and the object
over which the function is iterating. Node.js/JavaScript utility.
npm i object.reduce --save
bower install object.reduce --save
A callback function is executed once for each own enumerable property in the object, receiving four arguments:
acc
: the initial value (or value from the previous callback call),value
: the of the current property,key
: the of the current property, andobject
over which the function is iterating.Example
var reduce = require('object.reduce');
var a = {a: 'foo', b: 'bar', c: 'baz'};
reduce(a, function (acc, value, key, obj) {
acc[key] = value.toUpperCase();
return acc;
}, {});
//=> {a: 'FOO', b: 'BAR', c: 'BAZ'};
extend
but only copies missing properties/values to the target… moreInstall dev dependencies:
npm i -d && npm test
Pull requests and stars are always welcome. For bugs and feature requests, please create an issue
Jon Schlinkert
Copyright (c) 2015 Jon Schlinkert Released under the MIT license.
This file was generated by verb-cli on April 25, 2015.
FAQs
Reduces an object to a value that is the accumulated result of running each property in the object through a callback.
The npm package object.reduce receives a total of 813,631 weekly downloads. As such, object.reduce popularity was classified as popular.
We found that object.reduce demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
A supply chain attack has been detected in versions 1.95.6 and 1.95.7 of the popular @solana/web3.js library.
Research
Security News
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
Security News
Research
Socket researchers have discovered malicious npm packages targeting crypto developers, stealing credentials and wallet data using spyware delivered through typosquats of popular cryptographic libraries.